package jpa.entitys.promis.common;

import java.io.Serializable;

import javax.persistence.*;

import java.math.BigDecimal;
import java.util.Date;


/**
 * The persistent class for the CONTRACT_UNIT_DETAIL_PERIODS database table.
 * 
 */
@Entity
@Table(name="CONTRACT_UNIT_DETAIL_PERIODS")
@NamedQueries({
    @NamedQuery(name = "ContractUnitDetailPeriod.findAll", query = " SELECT c FROM ContractUnitDetailPeriod c "),
    @NamedQuery(name = "ContractUnitDetailPeriod.findById", query = " SELECT c FROM ContractUnitDetailPeriod c WHERE c.id = :Id "),
    @NamedQuery(name = "ContractUnitDetailPeriod.findByStatus", query = " SELECT c FROM ContractUnitDetailPeriod c WHERE c.syncIssync = 'N' And c.status = :status"),
})
public class ContractUnitDetailPeriod extends jpa.entitys.common.CommonEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	@EmbeddedId
	private ContractUnitDetailPeriodPK id;
	
	@Override public String toString() { return org.apache.commons.lang.builder.ToStringBuilder.reflectionToString(this);}

	@Column(precision=16, scale=2)
	private BigDecimal amount;

	@Column(name="CHARGE_CODE", length=2)
	private String chargeCode;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="CHARGING_MONTH")
	private Date chargingMonth;

	@Column(name="CHK_COMPARE", length=2)
	private String chkCompare;

	@Column(name="CONTRACT_STATUS", length=1)
	private String contractStatus;

	@Column(name="CREATED_BY", length=30)
	private String createdBy;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="CREATED_ON")
	private Date createdOn;

	@Column(name="CUSTOMER_ADDRESS_CODE", precision=2)
	private BigDecimal customerAddressCode;

	@Column(name="CUSTOMER_CODE", length=30)
	private String customerCode;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="DATE_ON_INVOICE")
	private Date dateOnInvoice;

	@Column(name="\"DAYS\"", precision=6)
	private BigDecimal days;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="DUE_DATE")
	private Date dueDate;

	@Column(name="FLOOR_ZONE_CODE", length=30)
	private String floorZoneCode;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="FROM_DATE")
	private Date fromDate;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="INVOICE_DATE")
	private Date invoiceDate;

	@Column(name="INVOICE_NO", precision=6)
	private BigDecimal invoiceNo;

	@Column(name="INVOICE_SEQ", precision=6)
	private BigDecimal invoiceSeq;

	@Column(name="INVOICE_SERIES", length=4)
	private String invoiceSeries;

	@Column(name="INVOICE_TYPE", length=2)
	private String invoiceType;

	@Column(name="INVOICE_WHT_FLAG", length=1)
	private String invoiceWhtFlag;

	@Column(name="INVOICING_TYPE", length=1)
	private String invoicingType;

	@Column(name="LAST_UPD_BY", length=30)
	private String lastUpdBy;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="LAST_UPD_ON")
	private Date lastUpdOn;

	@Column(name="PERIOD_FLAG", precision=22)
	private BigDecimal periodFlag;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="POSTING_DATE")
	private Date postingDate;

	@Column(name="PRICE_PER_DAY", precision=16, scale=2)
	private BigDecimal pricePerDay;

	@Column(name="PRICE_PER_UNIT", precision=16, scale=2)
	private BigDecimal pricePerUnit;

	@Column(length=300)
	private String remarks;

	@Column(name="SERVICE_VAT_FLAG", length=1)
	private String serviceVatFlag;

	@Column(length=1)
	private String status;

	@Column(name="SYNC_CREATEDBY", length=100)
	private String syncCreatedby;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="SYNC_CREATEDON")
	private Date syncCreatedon;

	@Column(name="SYNC_EXTERNAL_REF_KEY", length=100)
	private String syncExternalRefKey;

	@Column(name="SYNC_EXTERNAL_REF_NO", length=100)
	private String syncExternalRefNo;

	@Column(name="SYNC_ISSTAGING", length=1)
	private String syncIsstaging;

	@Column(name="SYNC_ISSYNC", length=1)
	private String syncIssync;

	@Column(name="SYNC_UPDATEDBY", length=100)
	private String syncUpdatedby;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="SYNC_UPDATEDON")
	private Date syncUpdatedon;

	@Column(name="TAX_TYPE_CODE", length=2)
	private String taxTypeCode;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="TO_DATE")
	private Date toDate;

	@Column(precision=16, scale=2)
	private BigDecimal total;

	@Column(name="UNDUE_PERIOD_AMOUNT", precision=16, scale=2)
	private BigDecimal unduePeriodAmount;

	@Column(precision=7, scale=2)
	private BigDecimal units;

	@Column(precision=16, scale=2)
	private BigDecimal vat;

	@Column(name="VAT_CODE", length=2)
	private String vatCode;

	@Column(name="VAT_RATE", precision=5, scale=2)
	private BigDecimal vatRate;

	@Column(precision=16, scale=2)
	private BigDecimal wht;

	@Column(name="WHT_CODE", length=2)
	private String whtCode;

	@Column(name="WHT_RATE", precision=5, scale=2)
	private BigDecimal whtRate;

    public ContractUnitDetailPeriod() {
    }

	public ContractUnitDetailPeriodPK getId() {
		return this.id;
	}

	public void setId(ContractUnitDetailPeriodPK id) {
		this.id = id;
	}
	
	public BigDecimal getAmount() {
		return this.amount;
	}

	public void setAmount(BigDecimal amount) {
		this.amount = amount;
	}

	public String getChargeCode() {
		return this.chargeCode;
	}

	public void setChargeCode(String chargeCode) {
		this.chargeCode = chargeCode;
	}

	public Date getChargingMonth() {
		return this.chargingMonth;
	}

	public void setChargingMonth(Date chargingMonth) {
		this.chargingMonth = chargingMonth;
	}

	public String getChkCompare() {
		return this.chkCompare;
	}

	public void setChkCompare(String chkCompare) {
		this.chkCompare = chkCompare;
	}

	public String getContractStatus() {
		return this.contractStatus;
	}

	public void setContractStatus(String contractStatus) {
		this.contractStatus = contractStatus;
	}

	public String getCreatedBy() {
		return this.createdBy;
	}

	public void setCreatedBy(String createdBy) {
		this.createdBy = createdBy;
	}

	public Date getCreatedOn() {
		return this.createdOn;
	}

	public void setCreatedOn(Date createdOn) {
		this.createdOn = createdOn;
	}

	public BigDecimal getCustomerAddressCode() {
		return this.customerAddressCode;
	}

	public void setCustomerAddressCode(BigDecimal customerAddressCode) {
		this.customerAddressCode = customerAddressCode;
	}

	public String getCustomerCode() {
		return this.customerCode;
	}

	public void setCustomerCode(String customerCode) {
		this.customerCode = customerCode;
	}

	public Date getDateOnInvoice() {
		return this.dateOnInvoice;
	}

	public void setDateOnInvoice(Date dateOnInvoice) {
		this.dateOnInvoice = dateOnInvoice;
	}

	public BigDecimal getDays() {
		return this.days;
	}

	public void setDays(BigDecimal days) {
		this.days = days;
	}

	public Date getDueDate() {
		return this.dueDate;
	}

	public void setDueDate(Date dueDate) {
		this.dueDate = dueDate;
	}

	public String getFloorZoneCode() {
		return this.floorZoneCode;
	}

	public void setFloorZoneCode(String floorZoneCode) {
		this.floorZoneCode = floorZoneCode;
	}

	public Date getFromDate() {
		return this.fromDate;
	}

	public void setFromDate(Date fromDate) {
		this.fromDate = fromDate;
	}

	public Date getInvoiceDate() {
		return this.invoiceDate;
	}

	public void setInvoiceDate(Date invoiceDate) {
		this.invoiceDate = invoiceDate;
	}

	public BigDecimal getInvoiceNo() {
		return this.invoiceNo;
	}

	public void setInvoiceNo(BigDecimal invoiceNo) {
		this.invoiceNo = invoiceNo;
	}

	public BigDecimal getInvoiceSeq() {
		return this.invoiceSeq;
	}

	public void setInvoiceSeq(BigDecimal invoiceSeq) {
		this.invoiceSeq = invoiceSeq;
	}

	public String getInvoiceSeries() {
		return this.invoiceSeries;
	}

	public void setInvoiceSeries(String invoiceSeries) {
		this.invoiceSeries = invoiceSeries;
	}

	public String getInvoiceType() {
		return this.invoiceType;
	}

	public void setInvoiceType(String invoiceType) {
		this.invoiceType = invoiceType;
	}

	public String getInvoiceWhtFlag() {
		return this.invoiceWhtFlag;
	}

	public void setInvoiceWhtFlag(String invoiceWhtFlag) {
		this.invoiceWhtFlag = invoiceWhtFlag;
	}

	public String getInvoicingType() {
		return this.invoicingType;
	}

	public void setInvoicingType(String invoicingType) {
		this.invoicingType = invoicingType;
	}

	public String getLastUpdBy() {
		return this.lastUpdBy;
	}

	public void setLastUpdBy(String lastUpdBy) {
		this.lastUpdBy = lastUpdBy;
	}

	public Date getLastUpdOn() {
		return this.lastUpdOn;
	}

	public void setLastUpdOn(Date lastUpdOn) {
		this.lastUpdOn = lastUpdOn;
	}

	public BigDecimal getPeriodFlag() {
		return this.periodFlag;
	}

	public void setPeriodFlag(BigDecimal periodFlag) {
		this.periodFlag = periodFlag;
	}

	public Date getPostingDate() {
		return this.postingDate;
	}

	public void setPostingDate(Date postingDate) {
		this.postingDate = postingDate;
	}

	public BigDecimal getPricePerDay() {
		return this.pricePerDay;
	}

	public void setPricePerDay(BigDecimal pricePerDay) {
		this.pricePerDay = pricePerDay;
	}

	public BigDecimal getPricePerUnit() {
		return this.pricePerUnit;
	}

	public void setPricePerUnit(BigDecimal pricePerUnit) {
		this.pricePerUnit = pricePerUnit;
	}

	public String getRemarks() {
		return this.remarks;
	}

	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}

	public String getServiceVatFlag() {
		return this.serviceVatFlag;
	}

	public void setServiceVatFlag(String serviceVatFlag) {
		this.serviceVatFlag = serviceVatFlag;
	}

	public String getStatus() {
		return this.status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getSyncCreatedby() {
		return this.syncCreatedby;
	}

	public void setSyncCreatedby(String syncCreatedby) {
		this.syncCreatedby = syncCreatedby;
	}

	public Date getSyncCreatedon() {
		return this.syncCreatedon;
	}

	public void setSyncCreatedon(Date syncCreatedon) {
		this.syncCreatedon = syncCreatedon;
	}

	public String getSyncExternalRefKey() {
		return this.syncExternalRefKey;
	}

	public void setSyncExternalRefKey(String syncExternalRefKey) {
		this.syncExternalRefKey = syncExternalRefKey;
	}

	public String getSyncExternalRefNo() {
		return this.syncExternalRefNo;
	}

	public void setSyncExternalRefNo(String syncExternalRefNo) {
		this.syncExternalRefNo = syncExternalRefNo;
	}

	public String getSyncIsstaging() {
		return this.syncIsstaging;
	}

	public void setSyncIsstaging(String syncIsstaging) {
		this.syncIsstaging = syncIsstaging;
	}

	public String getSyncIssync() {
		return this.syncIssync;
	}

	public void setSyncIssync(String syncIssync) {
		this.syncIssync = syncIssync;
	}

	public String getSyncUpdatedby() {
		return this.syncUpdatedby;
	}

	public void setSyncUpdatedby(String syncUpdatedby) {
		this.syncUpdatedby = syncUpdatedby;
	}

	public Date getSyncUpdatedon() {
		return this.syncUpdatedon;
	}

	public void setSyncUpdatedon(Date syncUpdatedon) {
		this.syncUpdatedon = syncUpdatedon;
	}

	public String getTaxTypeCode() {
		return this.taxTypeCode;
	}

	public void setTaxTypeCode(String taxTypeCode) {
		this.taxTypeCode = taxTypeCode;
	}

	public Date getToDate() {
		return this.toDate;
	}

	public void setToDate(Date toDate) {
		this.toDate = toDate;
	}

	public BigDecimal getTotal() {
		return this.total;
	}

	public void setTotal(BigDecimal total) {
		this.total = total;
	}

	public BigDecimal getUnduePeriodAmount() {
		return this.unduePeriodAmount;
	}

	public void setUnduePeriodAmount(BigDecimal unduePeriodAmount) {
		this.unduePeriodAmount = unduePeriodAmount;
	}

	public BigDecimal getUnits() {
		return this.units;
	}

	public void setUnits(BigDecimal units) {
		this.units = units;
	}

	public BigDecimal getVat() {
		return this.vat;
	}

	public void setVat(BigDecimal vat) {
		this.vat = vat;
	}

	public String getVatCode() {
		return this.vatCode;
	}

	public void setVatCode(String vatCode) {
		this.vatCode = vatCode;
	}

	public BigDecimal getVatRate() {
		return this.vatRate;
	}

	public void setVatRate(BigDecimal vatRate) {
		this.vatRate = vatRate;
	}

	public BigDecimal getWht() {
		return this.wht;
	}

	public void setWht(BigDecimal wht) {
		this.wht = wht;
	}

	public String getWhtCode() {
		return this.whtCode;
	}

	public void setWhtCode(String whtCode) {
		this.whtCode = whtCode;
	}

	public BigDecimal getWhtRate() {
		return this.whtRate;
	}

	public void setWhtRate(BigDecimal whtRate) {
		this.whtRate = whtRate;
	}

}